<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('新增叶子叶子单元')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-leaf_leaf_unit-add" th:object="${physicalUnit}">
        <input hidden name="id" th:field="*{id}">
        <div class="col-md-12">
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">类型：</label>
                <div class="col-sm-8">
                    <select class="form-control" name="unit7Type"
                            th:with="type=${@dict.getType('unit7_type')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
                                th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">名称：</label>
                <div class="col-sm-8">
                    <input class="form-control"
                           id="unit7Select"
                           name="unit7Name"
                           placeholder="请输入小区/街道/自然庄名称"
                           required="required" type="text">
                </div>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    var prefix = ctx + "workbench/leaf_unit_city_7"
    $("#form-leaf_unit_city-add").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/add", $('#form-leaf_leaf_unit-add').serialize());
        }
    }
</script>
</body>
</html>
